import turtle
import random

turtle.bgcolor("black")
color_list = ["red", "yellow", "blue", "grey", "orange", "purple", "white"]
# turtle.screensize(800, 600, "green")

t = turtle.Pen()

for n in range(50):
    t.pencolor(random.choice(color_list))
    size = random.randint(10, 41)
    x = random.randrange(-turtle.window_width() // 2, turtle.window_width() // 2)
    y = random.randrange(-turtle.window_height() // 2, turtle.window_height() // 2)
    t.penup()
    t.setpos(x, y)
    t.pendown()
    for m in range(size):
        t.forward(m * 2)
        t.left(91)